/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2018-2019.
 * Description: header for proc rtos, support idump feature
 * Author: nixiaoming
 * Create: 2018-3-3
 */

#ifndef _FS_PROC_RTOS_H_
#define _FS_PROC_RTOS_H_

#ifdef CONFIG_RTOS_RO_VMA_HASH
#include <linux/seq_file.h>
#endif

#ifdef CONFIG_RTOS_IDUMP_TRIGGER
extern const struct file_operations proc_coredump_trigger_operations;
#endif

#ifdef CONFIG_RTOS_IDUMP_FORCE
extern const struct file_operations proc_coredump_force_operations;
#endif

#if defined(CONFIG_RTOS_IDUMP_FORCE) || defined(CONFIG_RTOS_IDUMP_TRIGGER)
extern const struct file_operations proc_coredump_timeout_operations;
#endif

#ifdef CONFIG_RTOS_IDUMP
extern const struct file_operations proc_coredump_filter_type_operations;
extern const struct file_operations proc_coredump_stacksize_operations;
#endif /* end of CONFIG_RTOS_IDUMP */
#ifdef CONFIG_RTOS_COREDUMP_ON_EXIT
extern const struct file_operations proc_coredump_on_exit_operations;
#endif

#ifdef CONFIG_RTOS_SWXN
extern const struct file_operations proc_pid_swxn_operations;
#endif

#ifdef CONFIG_RTOS_RO_VMA_HASH
extern const struct file_operations proc_ro_vma_hash_operations;
extern int proc_ro_vma_hash_open(struct inode *inode, struct file *file,
		struct seq_operations *ops, int psize);
extern int proc_ro_vma_hash_release(struct inode *inode, struct file *file);
extern void proc_ro_vma_hash_cache(struct seq_file *m,
		void *v, loff_t *ppos);
#endif

#ifdef CONFIG_RTOS_MICROSTATE_ACCT
extern int proc_tgid_hstat(struct seq_file *m, struct pid_namespace *ns,
			  struct pid *pid, struct task_struct *task);
extern int proc_tid_hstat(struct seq_file *m, struct pid_namespace *ns,
				struct pid *pid, struct task_struct *task);
#endif
#endif /* _FS_PROC_RTOS_H_ */

